// CmdMsg.h : Declaration of the CCmdMsg

#ifndef __CMDMSG_H_
#define __CMDMSG_H_

#include "resource.h"       // main symbols
#include "GPSObjects.h"
#include "../include/comhdr.h"
/////////////////////////////////////////////////////////////////////////////
// CCmdMsg
class ATL_NO_VTABLE CCmdMsg : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CCmdMsg, &CLSID_CmdMsg>,
	public IDispatchImpl<ICmdMsg, &IID_ICmdMsg, &LIBID_GPSOBJECTSLib>
{
public:
	CCmdMsg()
	{
		memset(&cmdmsg,0,sizeof(cmdmsg));
	}

DECLARE_REGISTRY_RESOURCEID(IDR_CMDMSG)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CCmdMsg)
	COM_INTERFACE_ENTRY(ICmdMsg)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

	_cmd_msg cmdmsg;
	CComBSTR m_StrMessage;
// ICmdMsg
public:
	STDMETHOD(Reset)();
	STDMETHOD(get_lparam)(/*[out, retval]*/ long *pVal);
	STDMETHOD(put_lparam)(/*[in]*/ long newVal);
	STDMETHOD(get_wparam)(/*[out, retval]*/ long *pVal);
	STDMETHOD(put_wparam)(/*[in]*/ long newVal);
	STDMETHOD(get_Message)(/*[out, retval]*/ long *pVal);
	STDMETHOD(put_Message)(/*[in]*/ long newVal);
	STDMETHOD(get_TargetHwnd)(/*[out, retval]*/ long *pVal);
	STDMETHOD(put_TargetHwnd)(/*[in]*/ long newVal);
	PROP_IMPL(StrMessage,BSTR,CopyBSTR)
};

#endif //__CMDMSG_H_
